﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

	<head>
        <meta charset="UTF-8">
        <title>新闻类型管理</title>

        <link rel="stylesheet" href="../../static/plugins/layui/css/layui.css" media="all" th:href="@{/plugins/layui/css/layui.css}"/>
        <link rel="stylesheet" href="../../static/css/global.css" media="all" th:href="@{/css/global.css}">
        <link rel="stylesheet" href="../../static/plugins/font-awesome/css/font-awesome.min.css" th:href="@{/plugins/font-awesome/css/font-awesome.min.css}">
        <link rel="stylesheet" href="../../static/css/table.css" th:href="@{/css/table.css}"/>
        <link rel="stylesheet" href="../../static/css/myglobal.css" th:href="@{/css/myglobal.css}">
        <!--<link rel="stylesheet" href="../static/css/btable.css" th:href="@{css/btable.css}"/>-->

        <style type="text/css">
            .layui-form input[type=checkbox],.layui-form input[type=radio],.layui-form select
            {
                display: inline;
            }
        </style>
	</head>

    <blockquote class="layui-elem-quote">
        <a onclick="window.location.reload();" style='cursor:pointer;display: inline-block'>
            <img src="../../static/images/refresh.png" height="20" th:src="@{/images/refresh.png}"/>
        </a> <span style="display: inline-block;margin:5px">新闻类型管理</span>
    </blockquote>
    <div class="mycontent">

        <div class="layui-form-item margin-left" style="margin-bottom:5px;">
            <a href="addresource.html" th:href="@{/Admin/news/addnewstype}" class="layui-btn layui-btn-small"><i class="fa fa-plus" aria-hidden="true"></i> 添加</a>
        </div>

        <fieldset class="layui-elem-field" >
            <legend>类型列表</legend>
        <div class="layui-field-box">



                <table class="layui-table admin-table" >
                <thead>
                <tr>
                    <th width="5%">序号</th>
                    <th width="20%">类型名称</th>
                    <th width="10%">操作</th>
                </tr>
                </thead>
                <tbody>

                <!--/*@thymesVar id="bean" type="com.example.demo.news.bean.NewsType"*/-->
                <tr th:each="bean,beanStat:${newstypelist}" th:object="${bean}">
                    <td th:text="${beanStat.count}"></td>
                    <td th:text="*{typeName}"></td>
                    <td>
                        <a class="layui-btn layui-btn-mini" th:href="@{/Admin/news/newslist/{id}(id=${bean.id})}">新闻列表</a>
                        <a class="layui-btn layui-btn-mini" th:href="@{/Admin/news/editnewstype/{id}(id=${bean.id})}">编辑</a>
                        <a class="layui-btn layui-btn-mini layui-btn-danger" th:href="@{/Admin/news/delnewstype/{id}(id=${bean.id})}">删除</a>
                    </td>
                </tr>


                </tbody>
            </table>


             <div id="mypage"></div>
        </div>


        </fieldset>
    </div>






	</body>
    <script type="text/javascript" src="plugins/layui/layui.js" th:src="@{/plugins/layui/layui.js}"></script>
    <script type="text/javascript" src="../../static/js/mybase.js" th:src="@{/js/mybase.js}"></script>

    <script th:inline="javascript">
        pageer([[${newstypelist.totalPages}]],[[${newstypelist.getNumber()}]],'mypage',[[@{/Admin/news/newstypelist}]]);
    </script>

</html>